A remote system running an user interface (UI) application may start a user interactive session with a local device, connecting with the remote system via a network based upon a protocol, such as an extended device remote transfer protocol (XRT protocol). The user interactive session may facilitate interactions between the user of the local device and the UI application of the remote system so that the local device may render content provided by the remote system or other parties to the user. Based upon the XRT protocol, the remote system may send screen bitmaps and control commands to the local device and receive user input and state back from the local device. The local device may execute the control commands immediately after the receipt.
Therefore, for some of the control commands that may need to be executed by the local device at a specific time, the remote system may need to determine a timing to send the control commands so that the local device may receive and execute the command at the right time. Usually, the remote system may continue querying current time from the local device and send the command until the current time at the local device is proximal or equal to the specific time.